import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
// import PlayList from '../views/playList'
const PlayList =()=>import ('../views/playList.vue')
const songPage =()=>import ('@/views/songPage.vue')
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    path:'/playlist/:id',
    name:'playList',
    component:PlayList,
    props:true
  },
  {
    path:'/songPage/:id',
    name:'songPage',
    component:songPage,
    props:true
  }

]

const router = new VueRouter({
  routes
})

export default router
